<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改车辆-信息')" />
    <th:block th:include="include :: bootstrap-fileinput-css" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-info-edit" th:object="${carInfo}">
            <input name="carInfoId" th:field="*{carInfoId}" type="hidden">
            <input name="carId" th:field="*{carId}" type="hidden">
            <input name="menuId" th:field="*{menuId}" type="hidden">
            <input name="configType" th:field="*{configType}" type="hidden">
            <input id="car_info" name="info" th:field="*{info}" type="hidden">
            <div class="form-group" th:if="${carInfo.carInfoId!=null}">
                <label class="col-sm-2 control-label">图片</label>
                <div class="col-sm-8"
                     th:include="system/common/file_upload :: multiple_img(_file_id='multipleFile',_file_type='img',_file_list=${@file.getFiles(carInfo.carId,carInfo.configType)})"/>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">电池包位置：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a1" th:field="*{infoMap.a1}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">电池包供应商：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a2" th:field="*{infoMap.a2}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">电池类型：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a3" th:field="*{infoMap.a3}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">直流充电位置：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a4" th:field="*{infoMap.a4}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">交流充电位置：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a5" th:field="*{infoMap.a5}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">快充时间：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a6" th:field="*{infoMap.a6}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">慢冲时间：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a7" th:field="*{infoMap.a7}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">无线充电：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a8" th:field="*{infoMap.a8}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">电池包重量：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a9" th:field="*{infoMap.a9}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">电池包防护等级：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a10" th:field="*{infoMap.a10}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">电池冷却形式：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a11" th:field="*{infoMap.a11}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">高压控制器集成度：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a12" th:field="*{infoMap.a12}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">快充额定电压（V）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a13" th:field="*{infoMap.a13}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">快充峰值电压（V）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a14" th:field="*{infoMap.a14}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">慢充额定电压（V）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a15" th:field="*{infoMap.a15}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">慢充峰值电压（V）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a16" th:field="*{infoMap.a16}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">电池额定能量（kWh）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a17" th:field="*{infoMap.a17}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">电池峰值能量（kWh）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a18" th:field="*{infoMap.a18}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">电池包容量（Ah）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a19" th:field="*{infoMap.a19}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">电池包额定电压（V）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a20" th:field="*{infoMap.a20}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">电池包峰值电压（V）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a21" th:field="*{infoMap.a21}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">电池包额定能量密度：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a22" th:field="*{infoMap.a22}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">电池包额定能量密度：</label>
                <div class="col-sm-2">
                    <input name="infoMap.a23" th:field="*{infoMap.a23}" class="form-control" type="text" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">驱动电机数量：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b1" th:field="*{infoMap.b1}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">前电机供应商：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b2" th:field="*{infoMap.b2}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">前电机类型：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b3" th:field="*{infoMap.b3}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">前电机防护形式：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b4" th:field="*{infoMap.b4}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">前电机冷却形式：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b5" th:field="*{infoMap.b5}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">前电动机额定功率（KW）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b6" th:field="*{infoMap.b6}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">前电动机峰值功率（KW）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b7" th:field="*{infoMap.b7}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">前电动机额定扭矩（N.m）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b8" th:field="*{infoMap.b8}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">前电动机峰值扭矩（N.m）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b9" th:field="*{infoMap.b9}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">前电动机总成重量（kg）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b10" th:field="*{infoMap.b10}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">前电动机额定功率密度：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b11" th:field="*{infoMap.b11}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">前电动机峰值功率密度：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b12" th:field="*{infoMap.b12}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">第二个后电机供应商：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b13" th:field="*{infoMap.b13}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">第二个后电机类型：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b14" th:field="*{infoMap.b14}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">第二个后电机防护形式：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b15" th:field="*{infoMap.b15}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">第二个后电机冷却形式：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b16" th:field="*{infoMap.b16}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">第二个后电动机额定功率（KW）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b17" th:field="*{infoMap.b17}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">第二个后电动机峰值功率（KW）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b18" th:field="*{infoMap.b18}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">第二个后电动机额定扭矩（N.m）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b19" th:field="*{infoMap.b19}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">第二个后电动机峰值扭矩（N.m）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b20" th:field="*{infoMap.b20}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">后电动机总成重量（2个电机）（kg）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b21" th:field="*{infoMap.b21}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">后电动总成机额定功率密度：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b22" th:field="*{infoMap.b22}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">后电动总成机峰值功率密度：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b23" th:field="*{infoMap.b23}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">驱动电机布局：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b24" th:field="*{infoMap.b24}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">后电机供应商：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b25" th:field="*{infoMap.b25}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">后电机类型：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b26" th:field="*{infoMap.b26}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">后电机防护形式：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b27" th:field="*{infoMap.b27}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">后电机冷却形式：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b28" th:field="*{infoMap.b28}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">后电动机额定功率（KW）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b29" th:field="*{infoMap.b29}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">后电动机峰值功率（KW）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b30" th:field="*{infoMap.b30}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">后电动机额定扭矩（N.m）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b31" th:field="*{infoMap.b31}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">后电动机峰值扭矩（N.m）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b32" th:field="*{infoMap.b32}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">后电动机总成重量（kg）：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b33" th:field="*{infoMap.b33}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">后电动机额定功率密度：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b34" th:field="*{infoMap.b34}" class="form-control" type="text" />
                </div>
                <label class="col-sm-2 control-label">后电动机峰值功率密度：</label>
                <div class="col-sm-2">
                    <input name="infoMap.b35" th:field="*{infoMap.b35}" class="form-control" type="text" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label"></label>
                <div class="col-sm-8"><button type="button" class="btn btn-success" onclick="submitHandler()">上传</button></div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: bootstrap-fileinput-js" />
    <th:block th:include="include :: select2-js" />
    <th:block th:include="include :: bootstrap-select-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/car/info";
        $("#form-info-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                let json=$('#form-info-edit').serializeJson();
                console.log(json)
                $('#car_info').val(JSON.stringify(json.infoMap)||'{}');
                let serialize = $('#form-info-edit').serialize();
                console.log(serialize)
                // console.log(JSON.stringify($('#form-info-edit').serializeJson()))
                // return;
                $.operate.save(prefix + "/edit?_="+Math.random(), serialize);
            }
        }
        $(function (){
            multipleFile_manager.init({busId: [[${carInfo.carId}]], busType: [[${carInfo.configType}]], fileType: 'img'});
        });
    </script>
</body>
</html>